home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 8 / FM Towns Free Software Collection 8.iso / t_os / gpen32k / source / lib / osrc / polygon.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-01  |  506 b   |  28 lines

  1. /*
  2.     おこめ標準グラフィック関数
  3. */
  4.  
  5. #include    <stdarg.h>
  6. #include    <EGB.h>
  7. #include    <Normlib.h>
  8.  
  9. extern char work[];
  10.  
  11. /*    polygon(ポイント数,x1,y1, ... , PaintMode, Color );    */
  12. void polygon(int s, ... )
  13. {
  14.     int i;
  15.     char pa[1024];
  16.     va_list ap;
  17.     WORD(pa ) = s;
  18.     va_start(ap, s);
  19.     for (i=0; i<s*2; i++)
  20.         WORD(pa+i*2+2) = va_arg(ap, int);
  21.     EGB_paintMode(work, va_arg(ap, int));
  22.     i = va_arg(ap, int);
  23.     EGB_color(work, 0, i);
  24.     EGB_color(work, 2, i);
  25.     va_end(ap);
  26.     EGB_polygon(work, pa);
  27. }
  28.